<template>
  <div class="panel-container">
    <div class="icon top-left"></div>
    <div class="icon top-right"></div>
    <div class="icon bottom-left"></div>
    <div class="icon bottom-right"></div>
    <div class="header">
      <img :src="icon" alt="" />
      <h2 class="title">{{ title }}</h2>
    </div>
    <div class="content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    icon: String,
    title: String
  },
  components: {},
  mounted() {}
};
</script>

<style scoped lang="less">
.panel-container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 75px 3.9vh 40px 3.9vh;
  background-image: linear-gradient(rgba(98, 133, 140, 0.25), rgba(103, 121, 161, 0.25));

  .header {
    position: absolute;
    top: 40px;
    right: 3.9vh;
    left: 3.9vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 32px;

    img {
      width: 32px;
      height: 32px;
      margin-right: 12px;
    }
    .title {
      color: #fff;
      font-weight: bold;
      font-size: 1.9vh;
    }
  }
  .content {
    height: 100%;
  }

  > .icon {
    position: absolute;
    width: 1.62vh;
    height: 22px;
    border: 2px solid #67c4f0;

    &.top-left {
      top: 0;
      left: 0;
      border-right: none;
      border-bottom: none;
    }

    &.top-right {
      top: 0;
      right: 0;
      border-bottom: none;
      border-left: none;
    }

    &.bottom-left {
      bottom: 0;
      left: 0;
      border-top: none;
      border-right: none;
    }

    &.bottom-right {
      right: 0;
      bottom: 0;
      border-top: none;
      border-left: none;
    }
  }
}
</style>
